<?php
/**
 * Created By Project
 * Author: 陈东
 * Copyright：陈东
 * Source Code：陈东
 * Explain：I shall not authorize for any other commercial purposes, law breakers must be prosecuted.
 */
namespace Liveadmin\Widget;
use Think\Controller;
class LiveWidget extends Controller {

	public function livestatus($livestarttime,$liveendtime){
		$time = date("Y-m-d H:i:m");
		if($time<$livestarttime){
			//直播未开始
			echo "<b class=\"w\">未开始</b>";
		}else if($time>$liveendtime){
			//直播已结束
			echo "<b class=\"w w1\">已结束</b>";
		}else if($time>=$livestarttime && $time<=$liveendtime){
			//正在直播
			echo "<b class=\"w w2\">正在直播</b>";
		}else{
			//其他状态
			echo "<b class=\"w w3\">状态失效</b>";
		}
	}
}
?>